﻿
    using System;
    namespace _1.MobilePhoneDevice
    {
        public class Call
        {
            private int phoneNumber;
            private DateTime startTime;
            private DateTime endTime;
            private TimeSpan duration;
            private double callPrice;

            // Properties

            public double CallPrice
            {
                get { return this.callPrice; }
            }

            public int Number
            {
                get { return this.phoneNumber; }
            }
            public DateTime StartTime
            {
                get { return this.startTime; }
            }
            public DateTime EndTime
            {
                get { return this.endTime; }
            }
            public TimeSpan Duration
            {
                get
                {
                    return duration;
                }

            }
            // **************************************************
            // Constructors
            public Call(int phoneNumber, DateTime startTime, DateTime endTime, double callPrice)
            {
                this.phoneNumber = phoneNumber;
                this.startTime = startTime;
                this.endTime = endTime;
                this.callPrice = callPrice;
                this.duration = endTime - startTime;
            }
            // **************************************************
        }
    }

